package com.epam.tcs.dao.hibernate.entities;


import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;


import java.util.List;

@Entity
@DiscriminatorValue(value = "1")
public class Practice  extends ThemeItem{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7405704975746503344L;
	
	private List<JournalPracticeStatus> journalPracticeStatuses;
	
	public void setJournalPracticeStatuses(List<JournalPracticeStatus> journalPracticeStatuses) {
		this.journalPracticeStatuses = journalPracticeStatuses;
	}
	
	@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "practice")
	public List<JournalPracticeStatus> getJournalPracticeStatuses() {
		return journalPracticeStatuses;
	}
}
